package com.ynet.middleground.approve.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.springframework.stereotype.Component;

/**
 * 审批中心工具类
 * 
 * 
 */
@Component
public class CommUtils {

    /**
     * 只允许字母数字，以及英文逗号
     * 
     * @param available_channel
     * @return
     */
    public static boolean checkChannel(String available_channel) {
        String regex = "^[a-zA-Z0-9,]+$";
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(available_channel);
        if (m.matches()) {
            return true;
        }
        return false;
    }

}
